package com.seb.cc.gtou.db;

import android.content.ContentValues;
import android.net.Uri;
import android.provider.BaseColumns;


import com.seb.cc.gtou.provider.GTProvider;

public final class GTLieuPartDB {
	public static final String LIEU_PART_NAME = "lieuparticipant";
	public static final String LIEUPART_TABLE_NAME = "lieupart";

	public static final String LIEUPART_CREATE_TABLE = "CREATE TABLE "
			+ LIEUPART_TABLE_NAME + " (" + GTLieuPartTable.LIEU_ID
			+ " INTEGRER, " + GTLieuPartTable.PART_ID + " INTEGER " 
			+ ");";
	

	public static final String[] SEJPART_PROJECTION = new String[] {
			GTLieuPartDB.GTLieuPartTable.LIEU_ID,
			GTLieuPartDB.GTLieuPartTable.PART_ID };
	
	public static boolean valide(ContentValues values) {
		boolean result = (values
				.containsKey(GTLieuPartDB.GTLieuPartTable.LIEU_ID)
				&& values.containsKey(GTLieuPartDB.GTLieuPartTable.PART_ID)) || values.equals(null);

		return result;
	} // valide
	
	private GTLieuPartDB() {
	} // GTSejPartDB

	
	
	
	public static final class GTLieuPartTable implements BaseColumns {

		private GTLieuPartTable() {
		} // GTSejPartTable

		/**
		 * The content:// style URL for this table
		 */
		public static final Uri CONTENT_URI = Uri.parse("content://"
				+ GTProvider.AUTHORITY + "/" + LIEU_PART_NAME);

		/**
		 * The MIME type of {@link #CONTENT_URI} providing a directory of notes.
		 */
		public static final String CONTENT_TYPE = "vnd.android.cursor.dir/vnd.gtou.lieupart";

		/**
		 * The MIME type of a {@link #CONTENT_URI} sub-directory of a single
		 * sejour.
		 */
		public static final String CONTENT_ITEM_TYPE = "vnd.android.cursor.item/vnd.gtou.lieupart";


		/**
		 * ID du sejour
		 * <P>
		 * Type: INTEGER
		 * </P>
		 */
		public static final String LIEU_ID = "Lieu_ID";

		/**
		 * ID du participant
		 * <P>
		 * Type: INTEGER
		 * </P>
		 */
		public static final String PART_ID = "Participant_ID";


	} // static final class GTSejPartDB
}
